package com.example.forum.utils;

import com.example.forum.common.AppResult;
import com.example.forum.common.ResultCode;
import com.example.forum.exception.ApplicationException;
import lombok.extern.slf4j.Slf4j;

/**
 * 功能描述:
 *
 * @author Lenovo
 * @date 2024/12/19
 */
public class IdNotNullUtil {
    public static void idNotNullUtil(Long id){
        if (id == null || id <= 0 ) {
           // log.warn(ResultCode.FAILED_PARAMS_VALIDATE.toString());
            throw new ApplicationException(AppResult.failed(ResultCode.FAILED_PARAMS_VALIDATE));
        }
    }
}
